﻿using Castle.DynamicProxy;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Light.Aop
{
    /// <summary>
    /// 日志拦截器
    /// </summary>
    public class LogInterceptor : StandardInterceptor, ILogInterceptor
    {

        ///// <summary>
        ///// 执行方法之前调用
        ///// </summary>
        ///// <param name="invocation"></param>
        //protected override void PreProceed(IInvocation invocation)
        //{
        //    base.PreProceed(invocation);
        //}

        //protected override void PerformProceed(Castle.DynamicProxy.IInvocation invocation)
        //{
        //    base.PerformProceed(invocation);
        //}

        /// <summary>
        /// 执行方法之后调用
        /// </summary>
        /// <param name="invocation"></param>
        protected override void PostProceed(IInvocation invocation)
        {
            base.PostProceed(invocation);

            //执行完成后，记录操作日志
        }
    }
}
